#!/usr/bin/env node
const fs = require('fs');
const file = process.argv[2];
//get file
try {
  let len = fs.statSync(file).size;
  //create buffer
  let buf = Buffer.alloc(len);
  let fid = fs.openSync(fid,buf,0,len,0);
  console.log(buf.toString('utf8'));
  fs.closeSync(fid);
}catch(e){
  console.error(e.message);
  process.exit(1);
}
